package com.aispeech.jarpc.op.post;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.PropertyNamingStrategy;
import com.fasterxml.jackson.databind.annotation.JsonNaming;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class)
public class OfflineResult {
    private int code;
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Map<String, Long> metrics;

    public Map<String, Long> getMetrics() {
        return metrics;
    }

    public void setMetrics(Map<String, Long> metrics) {
        this.metrics = metrics;
    }

    public List<Onebest> getResults() {
        return results;
    }

    public void setResults(List<Onebest> results) {
        this.results = results;
    }

    public List<Segment> getSegments() {
        return segments;
    }

    public void setSegments(List<Segment> segments) {
        this.segments = segments;
    }

    private List<Onebest> results;
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private List<Segment> segments;

    public OfflineResult() {
        metrics = new HashMap<>();
        results = new ArrayList<>();
        segments = new ArrayList<>();
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }
}
